<style>
label{
	text-align:right;
}
</style>
<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4>
					<span>Form Cetak History Trouble</span>
				</h4>
			</div>
			<div class="panel-body">
				<?php echo form_open($post_action);?>
					<div class="form-group">
						<label class="col-lg-3 control-label" for="datepicker">Tanggal Awal</label>
						<div class="col-lg-3">
							<input type="text" name="tanggal_awal" id="tanggal_awal" class="form-control datepicker">
						</div>
						<font color="red"><?php echo form_error("tanggal_awal"); ?></font>
					</div>
					<br>
					<br>
					<br>
					<div class="form-group">
						<label class="col-lg-3 control-label" for="datepicker">Tanggal Akhir</label>
						<div class="col-lg-3">
							<input type="text" name="tanggal_akhir"  id="tanggal_akhir" class="form-control datepicker">
						</div>
						<font color="red"><?php echo form_error("tanggal_akhir"); ?></font>
					</div>
					<br>
					<br>
					<div class="form-group">
						<div class="col-lg-offset-3 col-lg-9">
							<button type="submit" class="btn btn-info"><span class="iconic-icon-chart white"></span> Cetak</button>
							<button type="reset" class="btn btn-info"><span class="icon-remove icon-white"></span> Reset</button>
						</div>
					</div>
				<?php echo form_close();?>
			</div>
		</div>
	</div>
</div>

<script language="javascript">
$(document).ready(function() {
	if($('#tanggal_awal').length) {
		$('#tanggal_awal').datepicker({
	        inline: true,
			dateFormat:"dd-mm-yy",
			showOtherMonths:true
	    });
	}
	if($('#tanggal_akhir').length) {
		$('#tanggal_akhir').datepicker({
	        inline: true,
			dateFormat:"dd-mm-yy",
			showOtherMonths:true
	    });
	}
});
</script>